///*
// * This file is part of the Sx Framework Library.
// * 
// * Copyright (C) 2013 University of Colorado Denver
// * <min.choi@ucdenver.edu> <shane.transue@ucdenver.edu>
// * 
// * Permission is hereby granted, free of charge, to any person obtaining a copy 
// * of this software and associated documentation files (the "Software"), to deal
// * in the Software without restriction, including without limitation the rights
// * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 
// * copies of the Software, and to permit persons to whom the Software is 
// * furnished to do so, subject to the following conditions:
// * 
// * The above copyright notice and this permission notice shall be included in 
// * all copies or substantial portions of the Software.
// * 
// * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 
// * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 
// * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 
// * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 
// * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 
// * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 
// * DEALINGS IN THE SOFTWARE.
// */
//#ifndef SX_MSS_REPLAY_CONTROLLER_H
//#define SX_MSS_REPLAY_CONTROLLER_H
//
//#include <sxMassSpringSimulationController.h>
//#include <sxMassSpringSimulation.h>
//#include "MSM_SimulationRecording.h"
//
//namespace Sx {
//namespace Simulation {
//namespace Interface {
//
///*
// * A mass-spring simulation controller provides a viewport controller that
// * primarily updates the objects within a mass-spring simulation and then
// * renders that simulation. A replay controller will only function once it has
// * been provided a MSM_SimulationRecording (see setRecording(..)). Once a
// * valid recording has been provided this controller must be assigned to a
// * viewport implementation. That viewport implementation is responsible for
// * calling this classes render() function to progress the playback of frames.
// */
//class MSS_ReplayController : public MassSpringSimulationController {
//public:
//	MSS_ReplayController(Viewport* viewport, Graphics::Objects::Rendering::RendererImplementation* cameraRenderer, Simulations::MassSpringSimulation* simulation);
//	virtual ~MSS_ReplayController();
//
//	/*
//	 * Render function that should be called in a viewport implementation. This
//	 * function will provide the functionality of the view controller as well
//	 * as support the commands for processing the internal recording (to set a
//	 * mass-spring simulation recording see setRecording(..)).
//	 */
//	void render() const;
//
//	/*
//	 * Set the mass-spring mesh recording that this replay controller will play
//	 * through. Pointer ownership of the recording is not transferred to this
//	 * object.
//	 */
//	bool setRecording(Recording::MSM_SimulationRecording* recording);
//
//	/*
//	 * Pause and resume the playback of the internal recording. Frames will be
//	 * processed through the viewport controller pre/post Render functions even
//	 * when this playback is paused. Pausing this replay controller will only
//	 * stop the update of the mass-spring systems objects node state data.
//	 */
//	void pause();
//	void resume();
//
//	/* 
//	 * Play the internal recording referenced by this replay controller. Note
//	 * that to progress the animation the render() function must be periodically
//	 * called from a timer. Also a valid graphics context has to be present to
//	 * display the data.
//	 */
//	void play();
//
//	/* Return the state of this replay controller */
//	bool isPlaying() const;
//	bool isPaused() const;
//
//	bool setStartFrame(unsigned int frameNumber);
//	bool setEndFrame(unsigned int frameNumber);
//
//	/* Returns true if the internal recording has been set; otherwise false. */
//	bool hasRecording() const;
//
//	/*
//	 * Returns the number of frames contained by the internal recording. If the
//	 * recording has not been set then these function return 0.
//	 */
//	unsigned int getFrameCount() const;
//	unsigned int getNumFrames() const;
//
//protected:
//	/* 
//	 * Helper function that restores the state of each object in the simulation
//	 * before the simulation is rendered.
//	 */
//	bool loadFrame() const;
//
//	/* POINTER_OWNERSHIP: NO */
//	Recording::MSM_SimulationRecording* recording;
//
//	/* 
//	 * Determines if the internal recording data is applied to the objects in
//	 * a mass-spring simulation. Even if this replay controller is paused it
//	 * will still process input events for the view controllers camera.
//	 */
//	bool paused;
//
//	/*
//	 * The internal recording consists of a finite number of frames. The 
//	 * recording can then be played from any interval between the beginning
//	 * frame and end frame (startFrame <= endFrame must always be true).
//	 *
//	 * The current frame index is defined in ViewportController (frameIndex).
//	 */
//	unsigned int startFrame, endFrame;
//};
//
//}
//
//}
//
//}
//
//#endif
